export function getDateTime(timeStamp) {
  let time = new Date(timeStamp);

  let y = time.getFullYear();
  let m = time.getMonth()+1;
  let d = time.getDate();
  let h = time.getHours();
  let mm = time.getMinutes();
  let s = time.getSeconds();
  return y+'/'+add0(m)+'/'+add0(d)+'-'+add0(h)+':'+add0(mm)+':'+add0(s);
}
export function getDateTimeHeng(timeStamp) {
  let time = new Date(timeStamp);

  let y = time.getFullYear();
  let m = time.getMonth()+1;
  let d = time.getDate();
  let h = time.getHours();
  let mm = time.getMinutes();
  let s = time.getSeconds();
  return y+'-'+add0(m)+'-'+add0(d)+' '+add0(h)+':'+add0(mm)+':'+add0(s);
}

function add0(m){
  // console.log(m);
  return m<10?'0'+m:m;
}

export function getDateTime1(val) {
  let dateTime = val.split('.')[0];

  return dateTime.split('T')[0]+' '+dateTime.split('T')[1];
}
